<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no"/>
	<title>更多信息</title>
	<link rel="stylesheet" href="css/lt_common.css">
	<link rel="stylesheet" href="css/more_infor.css">
</head>
<body>
	<div class="page">
		<div class="customer_infor">
			
			<!-- <img src="img/default.png" alt="">
			<h3>王冲</h3>
			<p>客户经理</p>
			<i class="logo_in"></i> -->
			
		</div>
		<div class="honor_content">
			
			<!-- <span>个人荣誉</span>
			<i class="zhuan"></i>
			<li>2014年获得新华保险股份有限公司“优秀讲师”称号。</li>
			<i class="zhuan"></i>
			<li>2013年获得新华保险股份有限公司“最佳职工”称号。</li>
			 -->
		</div>
		<ul class="list_content clear">
			<!-- <li class="clear">专业领域<span>理财保险</span></li>
			<li class="clear">所在部门<span>培训部</span></li>
			<li class="clear">邮箱<span>xuelan@cloud.com</span></li>
			<li class="clear">微信<span>MSMxiaolan</span></li>
			<li class="clear">陌陌<span>1320976402</span></li>
			<li class="clear">QQ<span>3198740123</span></li> -->	
		</ul>
		<div class="foot_logo">
			<img src="img/foot_logo.png" height="15" width="297" alt="">
		</div>
	</div>
</body>
</html>
<script src="js/jquery.js"></script>
<script src="js/common.js"></script>
<script src="js/more_infor.js"></script>
<script >

$(function(){
	//初始化
	initAction();
});

var openid = getQueryString('openid');

//初始化
function initAction () {

	$.ajax({
		url: API_URL+'agent/getbyopenid?openid='+openid,
		type: 'GET',
		dataType: "JSON",
		data:'',
		async: false,
		success: function (obj){
			if (obj.status.code == 0) {
				var myData = obj.data;
				var Str = '';
				for(var i=0; i < myData.length; i++){
					var agentItem = myData[i];
					if(agentItem.icon == null || agentItem.icon == ''){
						agentItem.icon ='img/default.png';
					}
					//名称与头像赋值
					var Str = '<img src=\"'+agentItem.icon+'\" alt=""><h3>'+agentItem.name+'</h3><p>'+agentItem.quarters+'</p><i class="logo_in"></i>';
					$('.customer_infor').html(Str);
					//荣誉赋值
					Str = '';//清空
					Str = '<span>个人荣誉</span><ul class="honer_list" >';
					var item = agentItem.agent_honor;
					if( item!= null ){
						for(var i = 0 ; i < item.length ; i ++){
							Str += '<i class="zhuan"></i>';
							Str += '<li>'+item[i]+'</li>';
						}
						Str += '</ul>';
					}
					$('.honor_content').html(Str);
					Str = '';//清空
					//领域,所在部门,社交工具（多）
					Str = '<li class="clear">专业领域<span>'+agentItem.professional+'</span></li>';
					Str += '<li class="clear">所在部门<span>'+agentItem.department+'</span></li>';
					//社交工具遍历
					if(agentItem.agentsocial != null && agentItem.agentsocial != ""){
						var item = agentItem.agentsocial;
						for(var j = 0 ; j < item.length ; j++){
							var value = item[j].social_value;
							if(item[j].social_key == "qq"){
								Str += '<li class="clear">QQ<span>'+value+'</span></li>';
							}
							if(item[j].social_key == "wechat"){
								Str += '<li class="clear">微信<span>'+value+'</span></li>';
							}
							if(item[j].social_key == "momo"){
								Str += '<li class="clear">陌陌<span>'+value+'</span></li>';
							}
							if(item[j].social_key == "email"){
								Str += '<li class="clear">邮箱<span>'+value+'</span></li>';
							}
						}
					}
					$('.list_content.clear').html(Str);
				}
			}
		},
		error: function (data){
			console.log("服务器异常!");
		}
	});
	
}

function addhonor_item(item){

		
		
}
</script>